<template>
	<view>
		<view style="margin-top: 0px;">
			<view class="card-width ccardbox" v-if="dataList.length>0">
				<view v-for="(item,index) in dataList" :key="index">
					<card :item="item" :status="newStatus" :token="token" @goto="godetails"></card>
				</view>

				<view class="nomore" v-if="!nextPage">
					<text class="nomore-text">没有数据了</text>
				</view>
			</view>
			<nodata v-else :token="token" ></nodata>
		</view>
	</view>
</template>

<script>
	import card from '@/components/card.vue';
	import nodata from '@/components/nodata.vue';
	import {
		codeFormate,
		statusList
	} from '@/utils/common.js';
	import {
		connectParams
	} from '@/utils/util.js';
	import {
		formateDate
	} from '../utils/util.js'

	export default {
		components: {
			card,
			nodata
		},
		props: {
			status:{
				type:[String,Number]
			},
			dataList: Array,
			isLoad: true,
			type: String,
			token: String,
			nextPage: Boolean
		},
		data() {
			return {
				InputBottom: 0,
				newStatus:this.status,
			};
		},
		mounted() {

		},
		onLoad(option) {

		},
		methods: {
			godetails(item) {
				uni.navigateTo({
					url: `/pages/search/orderDetails?item=${encodeURIComponent(JSON.stringify(item))}`
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
	.card-width {
		position: absolute;
		width: 100%;
	}

	.nomore {
		display: flex;
		justify-content: center;

	}

	.nomore-text {
		font-size: 16px;
		color: #666;
		padding: 10px 0 20px 0;
	}

	.content-wrap .content-label {
		width: 90px;
	}


	.ccardbox {}
</style>
